<!DOCTYPE html>
<html lang="en" style="font-size: 48px;"><head>
	<meta charset="UTF-8">
	<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <meta content="email=no" name="format-detection">
	<title>{{$activityInfo->adTitle}}</title>
    <link rel="stylesheet" href="https://resource.xinrangj.com/assets/ytqc/css/index.css?t=5" id="css">
    <link rel="stylesheet" href="https://resource.xinrangj.com/assets/ytqc/css/layui.mobile.css?t=1">
	<script src="https://resource.xinrangj.com/assets/ytqc/js/jquery1.11.3.js?t=1"></script><style id="__WXWORK_INNER_SCROLLBAR_CSS">::-webkit-scrollbar { width: 12px !important; height: 12px !important; }::-webkit-scrollbar-track:vertical {  }::-webkit-scrollbar-thumb:vertical { background-color: rgba(136, 141, 152, 0.5) !important; border-radius: 10px !important; background-clip: content-box !important; border:2px solid transparent !important; } ::-webkit-scrollbar-track:horizontal {  }::-webkit-scrollbar-thumb:horizontal { background-color: rgba(136, 141, 152, 0.5) !important; border-radius: 10px !important; background-clip: content-box !important; border:2px solid transparent !important; } ::-webkit-resizer { display: none !important; }</style>
	<script src="https://resource.xinrangj.com/assets/ytqc/js/layui.js?t=1"></script>
	<script src="https://resource.xinrangj.com/assets/ytqc/js/jquery.SuperSlide.2.1.1.js?t=1"></script>
	<script src="https://resource.xinrangj.com/assets/ytqc/js/jquery.lazyload.min.js"></script>
	<script src="https://res2.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
	<!--<script src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>-->
	<style type="text/css">
		/*=====红包排行版高度塌陷==============*/
.phitem div{
			line-height: 26px;
}
		/*=====红包弹窗==============*/
.mask5{
    background: #000;
    opacity: 0.5;
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    z-index: 66;
}
.hongbao,.chongbao{
    width: 5.35rem;
    height: 7rem;
    position: fixed;
    left:0;
    top: 0;
    bottom: 0;
    right: 0;
    margin: auto;
}
.hongbao{
    background:url('https://cs.xinrangj.com/assets/activity/images/hongbao.png') no-repeat;
    background-size:100%;
    z-index: 666;
}
.chongbao{
    background:url('https://cs.xinrangj.com/assets/activity/images/chongbao.png') no-repeat;
    background-size:100%;
    z-index: 665;
    display:none;
}
.hbbtn{
    display: block;
    width: 2rem;
    height: 2rem;
    position: relative;
    top: 3.7rem;
    left: 1.7rem;
}
.hbmoney{
    width: 1.5rem;
    height: 1.5rem;
    position: relative;
    top: 3.8rem;
    margin: auto;
    color: #FFD334;
    font-size: 0.6rem;
    line-height: 1.5rem;
    text-align: center;
    font-weight: 600;
}
.mask4{
    background: #000;
    opacity: 0.5;
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    z-index: 66;
}
.tcfirst_cont{
	text-align:center;
    background: #fff;
    padding-bottom: 0.1rem;
    width: 98%;
    margin: 0 auto;
    padding-top:0.1rem;
}
.tcfirst{
	background: #ffffff;
    width: 6.3rem;
    height: 2.8rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    border-radius: 10px;
    z-index: 776;
    /* display: none; */
    margin: auto;
    /* height: 100px; */
    box-sizing: border-box;
    padding: 0px 0.4rem;
	
}
.tcfirst_close{
    width: 100%;
    height: 0.8rem;
    line-height: 0.8rem;
    background: #eee;
    border-top: 1px solid #ddd;
    border-radius: 0 0 5px 5px;
    position: absolute;
    bottom: 0;
    left: 0;
    text-align: center;
    color: #6699ff;
}
#sharePoster{
	    position: absolute;
    right: 10px;
    bottom: 1.6rem;
    background: #f20593;
    padding: 10px 16px;
    color: #fff;
    border-radius: 20px;
    font-size: 14px;
}

	</style>
	
	<script>
		var deviceWidth=$(window).outerWidth();
         if(deviceWidth>=750){
             $("html").css("font-size","100px");            
         }else{
             $("html").css("font-size",deviceWidth/750*100+'px');      
         }
    </script> 
</head>
<body>
	<div class="container">
		<div class="banner">
			<div class="banner_bg">
				<img src="{{$activityInfo->adPicUrl}}">
			</div>
			<!-- ===========红包滚动=========== -->
			<div class="hbscroll">
				<div class="txtScroll-top">
					<div class="bd">
						<div class="tempWrap" style="overflow:hidden; position:relative; height:18px"><ul class="infoList" style="top: 0px; position: relative; padding: 0px; margin: 0px;">
							<li style="height: 18px;"><a>本活动由阿米的紫草护肤新美学体验馆-{{$sInfo->sName}}发起</a></li>
						</ul></div>
					</div>
				</div>
			</div>
			<script type="text/javascript">
			jQuery(".txtScroll-top").slide({titCell:".hd ul",mainCell:".bd ul",autoPage:true,effect:"top",autoPlay:true,vis:1});
			</script>
			<!-- ========立即制作============== -->
			
		</div><!-- banner -->

	    <!-- 背景音乐 -->
		<div class="icon rotate " id="audio_btn" onclick="pauseAudio()">
	      <audio autoplay="" loop="" class="audio1" id="myAudio">
	        <!--<source src="https://resource.xinrangj.com/assets/music/99.mp3" type="audio/mpeg">-->
	        <source src="https://resource.xinrangj.com/assets/music/88.mp3" type="audio/mpeg">
	        您的浏览器不支持 audio 元素。
	      </audio>
	    </div>
	    <script>
	    	//动画状态切换
		  $("#audio_btn").click(function() {
		    $(this).toggleClass("audio");
		  });
		  var music = document.getElementById("myAudio");
//		   console.log(music.paused);
		  // 音乐状态切换
		  function pauseAudio() {
		    if(music.paused) {
		      music.play();
		    } else {
		      music.pause();
		    }
		  }

	    </script>	    
	    <script>
//		    function autoPlayAudio() {
//		        wx.config({
//		            debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
//		            appId: '{{$wxJsSign["appId"]}}', // 必填，公众号的唯一标识
//		            timestamp: '{{$wxJsSign["timestamp"]}}', // 必填，生成签名的时间戳
//		            nonceStr: '{{$wxJsSign["nonceStr"]}}', // 必填，生成签名的随机串
//		            signature: '{{$wxJsSign["signature"]}}',// 必填，签名
//		            jsApiList: [
//		                "checkJsApi",
//		                "onMenuShareTimeline",
//		                "onMenuShareAppMessage",
//		                "updateAppMessageShareData",
//		                "updateTimelineShareData"
//		            ]
//		        });
//		        wx.ready(function() {
//		            var globalAudio=document.getElementById("myAudio");
//		            globalAudio.play();
//		        });
//			};
////			 解决ios音乐不自动播放的问题
//			autoPlayAudio();
		</script>

		<!-- 进度条 -->
		<div id="jindutiao">
			
		</div>
        <div id="hbph"></div><!-- 红包排行锚点 -->
		<!-- 倒计时 -->
				<div class="djs">
			<div class="djsTit">已有<b style="color:#ff0101;">{{$activityInfo->adApplyNum}}</b>人报名</div>
				<div class="djsbox">
					<div class="djstit">——距活动结束——</div>
					<div class="timeBox">
					<span id="t_d" class="time">{{$timeInfo['day']}}</span>
			          <span class="shijian">天</span>
			            <span id="t_h" class="time">{{$timeInfo['hour']}}</span>
			          <span class="shijian">时</span>
			            <span id="t_m" class="time">{{$timeInfo['min']}}</span>
			          <span class="shijian">分</span>
			            <span id="t_s" class="time">{{$timeInfo['sec']}}</span>
			          <span class="shijian">秒</span>
			        </div>
				</div>
						<div class="view fl">浏览次数：<b style="color:#4e1eeb;">{{$activityInfo->adViewNum}}次</b></div>
			<div class="view fr">转发次数：<b style="color:#4e1eeb;">{{$activityInfo->adShareNum}}次</b></div>
						<div class="cl"></div>
			<script>
				function getDJS() {
                var NowTime = new Date();
                var t = {{strtotime($activityInfo->adApplyEndTime)}}*1000 - NowTime.getTime();
		        if (t > 0) {
		          var d = Math.floor(t / 1000 / 60 / 60 / 24);
		          var h = Math.floor(t / 1000 / 60 / 60 % 24);
		          var m = Math.floor(t / 1000 / 60 % 60);
		          var s = Math.floor(t / 1000 % 60);
		          document.getElementById("t_d").innerHTML = d;
		          document.getElementById("t_h").innerHTML = h;
		          document.getElementById("t_m").innerHTML = m;
		          document.getElementById("t_s").innerHTML = s;
		        }
		      }
		      setTimeout(getDJS, 0);
		      setInterval(getDJS, 1000);
		    </script>
		</div>
				<!-- djs -->
		<!-- 红包排行 -->
				<div class="hbph main">
			<div class="hbph_box">
				<img class="tit2" src="https://resource.xinrangj.com/assets/ytqc/images/hbph.png">
				<div class="phtit">
					<div class="money">您已获得<b class="phtit_b1">{{$myApplyInfo?$myApplyInfo->aaShareMoney:0}}</b>元</div>
					<div class="">排行第<b class="phtit_b1">{{$myRank}}</b>名</div>
				</div>
				<div class="sort">
					<div>排名</div>
					<div>客户</div>
					<div>获得红包</div>
				</div>
				<div class="phb">
				<div class="txtMarquee-top">
					<div class="bd">
						<div class="tempWrap" style="overflow:hidden; position:relative;">
							<ul class="infoList" style="position: relative; padding: 0px; margin: 0px;">
							@foreach ($shareList as $applyInfo)
							<div class="phitem clone" style="height: 26px;">
								
								<div class="ranking ">{{$loop->iteration}}</div>
								
								<div class="username">
									<div><img src="{{$applyInfo->muHeadUrl}}" class="lazy" data-original="{{$applyInfo->muHeadUrl}}" style="display: inline-block;"></div>
									<div class="names">{{$applyInfo->aaName}}</div>
								</div>
								
								<div class="phmoney">
									{{$applyInfo->aaShareMoney}}元
									<!--<span>邀请1人</span>-->
								</div>
								
							</div>
							<div class="phitem" style="height: 8px;"></div>
							@endforeach
							</ul>
							
						</div>
					</div>
				</div>
				<script type="text/javascript">
					jQuery(".txtMarquee-top").slide({mainCell:".bd ul",autoPlay:true,effect:"topMarquee",vis:7,interTime:30});
				</script>
				</div>
			</div>
		</div>
				<!-- 解锁豪礼 -->
		
		
		<!-- 活动详情 -->
		<div class="dpshow main" style="width:100%;padding:0rem;margin-top:10px;">
			{!! $activityInfo->adDetails !!}
		</div>
		<!-- 点亮钻石 -->
				<!-- 购买记录 -->
				<div class="gmjl main">
			<div class="tit1">购买记录【<b style="color:#ff0000;">{{count($applyList)}}人</b>】</div>
				<div class="gmjl_top">
					<div class="bd">
						<div class="tempWrap" style="overflow:hidden; position:relative;">
							<ul style="position: relative; padding: 0px; margin: 0px;">
							@foreach ($applyList as $applyInfo)
							<div class="jlitem clone" style="height: 70px;">
								<div class="left">
									<div class="pic"><img src="{{$applyInfo->muHeadUrl}}"></div>
									<div class="yhm">
										<p>{{$applyInfo->aaName}}</p>
									</div>
								</div>
								<div class="center">
									<p>{{substr($applyInfo->aaPhone, 0, 3).'****'.substr($applyInfo->aaPhone, 7, 4)}}</p>
								</div>
								<div class="right" style="padding-top: 0.1rem;">
									<p style="color:#ff0000;text-align: center;">已支付￥{{$activityInfo->adCurrentPrice}}</p>
									<p style="color:#333;">{{$applyInfo->createTime}}</p>
								</div>
							</div>
							@endforeach
							</ul>
						</div>
					</div>		
				</div>						
			<script type="text/javascript">
				jQuery(".gmjl_top").slide({mainCell:".bd ul",autoPlay:true,effect:"topMarquee",vis:7,interTime:20});
			</script>
		</div>
				<!-- 技术支持 -->
				<div class="jszc">
			<p>本活动平台由<i style="color:#ff0000;">成都思先行科技有限公司</i> 提供技术支持</p>
			<p>——用科技创新  助力企业发展——</p>
		</div>
				<!-- 红包 动画 -->
			</div><!-- container -->
	<!-- 底部 -->
	<div class="footer" style="max-width: 750px;">
		
		<div id="sharePoster">
				<p>我的海报</p>
			</div>
		<!-- 状态1 -->
		<div class="rxtel_img" id="rxtel">
			<img src="https://resource.xinrangj.com/assets/ytqc/images/tel.png">
			<p>客服电话</p>
		</div>
		<div class="fph">
			<a href="#hbph">
				<img src="https://resource.xinrangj.com/assets/ytqc/images/ph.png">
				<p>红包排行</p>
			</a>
		</div>
			<div class="qgbtn" id="qgbtn">
				<p>立即抢购活动</p>
			</div>
				</div>
<!-- 立即抢购弹窗 -->
	<div class="mask" style="display: none;"></div>
	<div class="tcbox" style="display: none;">
		<div class="tctit">超值超优惠！手快赶紧抢购吧！</div>
		<div class="tc_cont">
			<p>请留下联系方式以便我们及时联系您！</p>
			<div action="" method="post">
				<select name="hdmb" class="hdmb">
										<option value="{{$sInfo->sName}}">{{$sInfo->sName}}</option>
									</select>
				<input type="text" name="username" placeholder="请填写真实姓名">
				<input type="number" name="usertel" placeholder="请填写您的手机号">
								<button onclick="callpay()">支付<i class="total-amount" style="font-style: normal;">{{$activityInfo->adCurrentPrice}}</i>元抢购</button>
			</div>
		</div>
	</div>
	<script>
		$("#qgbtn").click(function(){
		  $(".tcbox").slideToggle("slow");
		  $(".mask").show();
		});
		$(".mask").click(function(){
		  $(".tcbox").slideToggle("slow");
		  $(".mask").hide();
		});
		//加的效果
		$(".jia").click(function(){
            var _money = "{{$activityInfo->adCurrentPrice}}";
            var x =$(this).siblings(".num").val();
            x++;
            $(this).siblings(".num").val(x);
            var _totalAmount = (x * _money).toFixed(2);
            $('.total-amount').text(_totalAmount);
		});
		//减的效果
		$(".jian").click(function(){
            var _money = "{{$activityInfo->adCurrentPrice}}";
            var y = $(this).siblings(".num").val();
            y--;
            if(y < 0){y = 0;}
            $(this).siblings(".num").val(y);
            var _totalAmount = (y * _money).toFixed(2);
            $('.total-amount').text(_totalAmount);
		});
	</script>

<!-- 客服弹窗 -->
	<div class="mask2" style="display: none;"></div>
	<div class="tcbox2" style="display: none;">
		<div class="zbf">
			<h4>{{$sInfo->sName}}</h4>
			<p>负责人：{{$activityInfo->adServicerName}}</p>
			<p style="font-size:0.3rem;"><a href="tel:{{$activityInfo->adServicerMobile}}" style="color:#ECFF00;font-size:0.35rem;"><b>客服电话：{{$activityInfo->adServicerMobile}}</b></a></p>
			<p>店面地址：{{$activityInfo->adSiteDescribe}}</p>
		</div>
		<div class="tsinfo">
			<p style="font-size:0.3rem;">温馨提示：</p>
			<p>1.活动抢购成功后请及时到店面兑换激活</p>
			<p>2.本活动明码标价，绝无隐形消费</p>
			<p>3.本活动解释权归主办方所有</p>
							<p style="font-size:0.3rem;"><a href="tel:13330731235" style="color:#ff7a01;"><b>投诉电话：</b><b>15881057537</b></a></p>
							<p>投诉电话只处理售后问题，咨询活动请拨打客服电话！</p>
		</div>
	</div>
	<script>
		$("#rxtel").click(function(){
		  $(".tcbox2,.mask2").fadeIn("slow");
		});
		$(".mask2").click(function(){
		  $(".tcbox2,.mask2").fadeOut("slow");
		});
	</script>
	<!-- ddddddddddddddddddddddd  -->
	<div class="maskLoad" style="display: none;"></div>
	<div class="tcboxLoad" style="display: none;">
		<div>海报生成中。。。</div>
	</div>
	<script>
		$("#rxtel").click(function(){
		  $(".tcboxLoad,.maskLoad").fadeIn("slow");
		});
		$(".mask2").click(function(){
		  $(".tcboxLoad,.maskLoad").fadeOut("slow");
		});
	</script>
	<!-- ddddddddddddddddddddddd-->
<!-- 立即分享弹窗 -->
	<div class="mask3"></div>
	<div class="tcbox3">
		<div class="fxtit"><img src="https://resource.xinrangj.com/assets/ytqc/images/fxtit.png"></div>
		<div class="share_box">
						<div class="shareTit"><img src="https://resource.xinrangj.com/assets/ytqc/images/step.png"></div>
						<div class="step_txt">
				<p>把活动转发给朋友或分享到朋友圈，朋友抢购成功，您即可获得<b style="color:#ff0101;">8.80</b>元红包！</p>
			</div>
						<div class="step_txt">
				<p>朋友再转介绍给其他人抢购，您还可获得<b style="color:#ff0101;">3.00</b>元红包！多推广多得，无上限！</p>
			</div>
						<div class="shareTit2"><img src="https://resource.xinrangj.com/assets/ytqc/images/miao.png"></div>
						<div class="fxbox">
				<ul class="fxbtn">
					<li>
						<a id="fxewm"><img src="https://resource.xinrangj.com/assets/ytqc/images/ewmbtn.png"></a>
						<p>分享二维码海报</p>
					</li>
					<li>
						<a class="btn" id="sharebtn"><img src="https://resource.xinrangj.com/assets/ytqc/images/zfbtn.png"></a>
						<p>分享给朋友抢购</p>
					</li>
				</ul>
				<div class="cl"></div>
			</div>	
		</div>

	</div>
		<!-- 分享好友弹窗 -->
		<div class="fxmask">
		<div class="share"><img src="https://resource.xinrangj.com/assets/dzp/images/fenxiang.png" alt=""></div>
		<div class="fxewm"><img src="https://resource.xinrangj.com/assets/dzp/images/fxewm.png" alt="" style=" width: 2.7rem; height: 1.1rem;margin: 0.6rem 2.7rem;"></div>
		</div>
		<script>
		$(".fxewm").click(function(){
	  	$(".tcbox3,.mask3").fadeOut("slow");
	  	$(".tcbox1,.mask1").fadeIn("slow");
		});
		</script>
		<!-- 分享二维码海报 -->
		<div class="mask1"></div>
		<div class="tcbox1">
			<div class="tcbox1_cont">
				<div class="userimg"><img src="http://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTLc8H28qh31LD1N0BjD7CqolNlNXynNemwECps4MaNBzBwzy8orxdyibmFlpIV7INnH4Pbr7HtfpYg/132"></div>
				<div class="cont_box">
					<div class="tit">我是{{$muInfo['muNickName']}}，<br>我为 {{$sInfo->sName}}！{{$activityInfo->adTitle}}！ 代言</div>
					<div class="sys"><img src="https://resource.xinrangj.com/assets/ytqc/images/wxs.png"></div>
					<div class="ewm"><img src="/qrcode/Abx3NOWfslGO.png"></div>
					<p>扫一扫抢豪礼</p>
				</div>
			</div>
			<button>长按保存图片</button>
		</div>
		<!-- 红包弹窗 -->
	<div class="mask5" style="display: none"></div>
	<div class="tcbox5">
		<div class="hongbao" style="display: none"><a class="hbbtn"></a></div>
		<div class="chongbao" style="display: none"><p class="hbmoney"></p></div>
	</div>
	<!-- 打开弹窗 -->
		<script>
		$(".tcfirst_close").click(function(){
			$(".mask4,.tcfirst").fadeOut("slow");
		});
		$("#rxtel").click(function(){
		  $(".tcbox2,.mask2").fadeIn("slow");
		});
		$(".mask2").click(function(){
		  $(".tcbox2,.mask2").fadeOut("slow");
		});
	</script>
	<script>
        $(".hbbtn").click(function(){
            $.ajax({
                url: '/index/activity/receivesharered.html',
                type: 'post',
                dataType: 'json',
                data:{ag_id:agid},
                success: function (ret) {
                    if(ret.code){
                        $('.hbmoney').text(ret.data+'元');
                        $(".hongbao").hide();
                        $(".chongbao").show();
                    }else{
                    	alert(ret.msg);
                    }
                }
            });
        });
        $('.chongbao').click(function(){
        	$('.mask5').hide();
        	$('.chongbao').hide();
        })
	</script>
		<script>
			$(function() {
				  $("img.lazy").lazyload({effect: "fadeIn",failure_limit:100,threshold: 500});
			 });
			// 立即分享
			$("#qgbtn2,.hbpic").click(function(){
			  $(".tcbox3,.mask3").fadeIn("slow");
			});
			$(".mask3,#sharebtn,#fxewm").click(function(){
			  $(".tcbox3,.mask3").fadeOut("slow");
			});
			// 分享好友
			$("#sharebtn").click(function(){
			  $(".fxmask").fadeIn("slow");
			});
			$(".fxmask").click(function(){
			  $(".fxmask").fadeOut("slow");
			});
			// 分享二维码
			$("#fxewm").click(function(){
			  $(".tcbox1,.mask1").fadeIn("slow");
			});
			$(".mask1").click(function(){
			  $(".tcbox1,.mask1").fadeOut("slow");
			});
		</script>
	<script type="text/javascript">
		
		wx.config({
            debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
            appId: '{{$wxJsSign["appId"]}}', // 必填，公众号的唯一标识
            timestamp: '{{$wxJsSign["timestamp"]}}', // 必填，生成签名的时间戳
            nonceStr: '{{$wxJsSign["nonceStr"]}}', // 必填，生成签名的随机串
            signature: '{{$wxJsSign["signature"]}}',// 必填，签名
            jsApiList: [
                "checkJsApi",
                "onMenuShareTimeline",
                "onMenuShareAppMessage",
                "updateAppMessageShareData",
                "updateTimelineShareData"
            ]
        });
		
        var _param = {
            openid: 'o3zbnwozoSWkxOqnSe11ZWHUTZGU',
            ag_id:'8366',
            tg_id:'0'
        };
		
        wx.ready(function () {    

		    var globalAudio=document.getElementById("myAudio");
	        globalAudio.play();    	
            wx.onMenuShareAppMessage({
                title: "{{$muInfo['muNickName']}}邀请你参加{{$sInfo->sName}}！{{$activityInfo->adTitle}}！", // 分享标题
                desc: "{{$activityInfo->adTitle}}！仅需{{$activityInfo->adCurrentPrice}}元即可获得豪华大礼包！惊喜多多！！豪礼抢不停！！", // 分享描述
                link: "{!! $shareUrl !!}", // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
                imgUrl: "https://resource.xinrangj.com/uploads/20190719/3fbef9271905382cdd78156ab595df04.gif", // 分享图标
                success: function () {
                    _param.way = 'single';
                    $.ajax({
                        url: '/index/activity/sharesingle.html',
                        type: 'post',
                        dataType: 'json',
                        data:_param,
                        success: function (ret) {

                        }
                    });
                },
            });
            wx.onMenuShareTimeline({
                title: "{{$muInfo['muNickName']}}邀请你参加{{$sInfo->sName}}！{{$activityInfo->adTitle}}！", // 分享标题
                desc: "{{$activityInfo->adTitle}}！仅需{{$activityInfo->adCurrentPrice}}元即可获得豪华大礼包！惊喜多多！！豪礼抢不停！！", // 分享描述
                link: "{!! $shareUrl !!}", // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
                imgUrl: "https://resource.xinrangj.com/uploads/20190719/3fbef9271905382cdd78156ab595df04.gif", // 分享图标
                success: function () {
                    _param.way = 'timeline';
					setTimeout(function(){
						$.ajax({
							url: '/index/activity/shareok.html',
							type: 'post',
							dataType: 'json',
							data:_param,
							success: function (ret) {
								if(ret.code == 108){
                            		$('.mask5').show();
                            		$('.hongbao').show();

                            	}

							}
						});
					}, 500)
                },
            });
        }); 
 
		

        var agid = '8366';
        var token = '1ed64332096b583eff62173032a564dd';
        var tg_id = '0';

        function callpay()
        {
            var _username = $('input[name=username]').val();
            var _usertel = $('input[name=usertel]').val();
            var _beizhu = $('textarea[name=address]').val();
            if(!_username || !_usertel){
                alert('请填写真实姓名和手机号');
                return false;
            }
            var myreg=/^[1][0,1,2,3,4,5,6,7,8,9][0-9]{9}$/;
            if (!myreg.test(_usertel)) {
                alert('手机号格式不对');
                return false;
            }
            if (typeof WeixinJSBridge == "undefined"){
                if( document.addEventListener ){
                    document.addEventListener('WeixinJSBridgeReady', jsApiCall, false);
                }else if (document.attachEvent){
                    document.attachEvent('WeixinJSBridgeReady', jsApiCall);
                    document.attachEvent('onWeixinJSBridgeReady', jsApiCall);
                }
            }else{
                var _param = {};
                _param.pcKey = agid;
                _param.token = token;
                _param.tg_id = tg_id;
                _param.name = _username;
                _param.mobile = _usertel;
                _param.remark = _beizhu;
                _param.mb_name = $('.hdmb').val();
                _param.adId = '{{$activityInfo->adId}}';
                _param.referrerId = '{{$referrerId}}';
                _param.openid = '{{$muInfo["openid"]}}';

                var _buyNum = $('input[type=num]').val();
                var _tgNum = $('input[name=usernum]').val();
                if(_buyNum){
                    _param.buyNum = _buyNum;
                }
                if(_tgNum){
                    _param.tgNum = _tgNum;
                }
                if(_buyNum < 1){
                    alert('至少购买一个');
                    return false;
                }
                $.ajax({
                    type: "POST",
//                  url: "/activity/getWxPayJson",
                    url: "/activity/getWxPayUrl",
                    data: _param,
                    success: function(data) {
                    	console.log('POST result');
                    	console.log(data);
                    	if (typeof(data) == "string"){
                    		data = JSON.parse(data);
                    	}
                        if(data.code == 0){
                            alert(data.msg);
                        }else{
                            //jsApiCall(data.data);
                            window.location.href = data.data;
                        }
                    }
                });

            }
        }
		//调用微信JS api 支付
        function jsApiCall(str)
        {
            WeixinJSBridge.invoke(
                'getBrandWCPayRequest',str,
                function(res){
                    //WeixinJSBridge.log(res.err_msg);
                    // alert(res.err_code+"="+res.err_desc+"="+res.err_msg);
                    if(res.err_msg == "get_brand_wcpay_request:ok"){
                        window.location.reload();
                    }
                }
            );
        }
	</script>	
	<script type="text/javascript">
		$('#sharePoster').click(function(){
			$(".tcboxLoad,.maskLoad").fadeIn("slow");
        	var reqUrl = "{{route('getSharePoster')}}?sId={{$sInfo->sId}}&adId={{$activityInfo->adId}}&muCode={{$muInfo['muCode']}}";
        	$.ajax({
			  url: reqUrl,
			  success: function(response,status,xhr){
			  	$(".tcboxLoad,.maskLoad").hide();
			  	 if (response.code == 0){
			  	 	alert(response.msg);
			  	 }else{
			  	 	window.open(response.data);
			  	 }
			  },
			  dataType: 'json'
			});
        })
	</script>
</body>
</html>